***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
*** This Program already converted to Y2K                                                                                                                                                                                                                 
*** S&T Departement     on 29 April 1999 by Ben.Rahman                                                                                                                                                                                                    
***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
set cent on                                                                                                                                                                                                                                               
SET PROC TO SOSPRO                                                                                                                                                                                                                                        
SET PROC TO BOXPROC                                                                                                                                                                                                                                       
DO START                                                                                                                                                                                                                                                  
SET COLO TO W+/B,N+/BG                                                                                                                                                                                                                                    
CLEA                                                                                                                                                                                                                                                      
DO ADDRESSA                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
DR  = "Q:"                                                                                                                                                                                                                                                
F1  = "REVENUE2.DBF"                                                                                                                                                                                                                                      
F11 = "REVCASH.NTX"                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                          
USE &DR&F1                                                                                                                                                                                                                                                
SET EXCLU OFF                                                                                                                                                                                                                                             
GO TOP                                                                                                                                                                                                                                                    
DTGL  = DATE_VISIT                                                                                                                                                                                                                                        
DTGL1 = DATE_VISIT                                                                                                                                                                                                                                        
GO BOTT                                                                                                                                                                                                                                                   
DTGL2 = DATE_VISIT                                                                                                                                                                                                                                        
IF !NETERR()                                                                                                                                                                                                                                              
   SET INDE TO &DR&F11                                                                                                                                                                                                                                    
ELSE                                                                                                                                                                                                                                                      
   ?'FILE IS IN USE BY ANOTHER ...'                                                                                                                                                                                                                       
   INKEY(0)                                                                                                                                                                                                                                               
   RETU                                                                                                                                                                                                                                                   
ENDI                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
FLD  = 1                                                                                                                                                                                                                                                  
CMON = MONTH(DATE()) - 1                                                                                                                                                                                                                                  
**CMON = MONTH(DATE())                                                                                                                                                                                                                                    
STOR 0        TO BRS, HAL, CNT, NPIL, NINV, NFEE, NTINV, NTFEE, NGTINV, NGTFEE                                                                                                                                                                            
STOR SPAC(30) TO CNAME                                                                                                                                                                                                                                    
DO DISCAS1                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
DO WHIL .T.                                                                                                                                                                                                                                               
   DO CASE                                                                                                                                                                                                                                                
      CASE FLD = 1                                                                                                                                                                                                                                        
         @12,36 GET DTGL1                                                                                                                                                                                                                                 
         READ                                                                                                                                                                                                                                             
      CASE FLD = 2                                                                                                                                                                                                                                        
         @12,48 GET DTGL2                                                                                                                                                                                                                                 
         READ                                                                                                                                                                                                                                             
      CASE FLD = 3                                                                                                                                                                                                                                        
         @22,01 CLEA TO 22,78                                                                                                                                                                                                                             
         @15,24 PROMPT 'PRINT'                                                                                                                                                                                                                            
         @15,33 PROMPT 'CANCEL'                                                                                                                                                                                                                           
         MENU TO NPIL                                                                                                                                                                                                                                     
         DO CASE                                                                                                                                                                                                                                          
            CASE NPIL = 1                                                                                                                                                                                                                                 
               DO PRIN1                                                                                                                                                                                                                                   
               DO INIT1                                                                                                                                                                                                                                   
               DO DISCAS1                                                                                                                                                                                                                                 
               @15,01 CLEA TO 15,78                                                                                                                                                                                                                       
               LOOP                                                                                                                                                                                                                                       
            CASE NPIL = 2                                                                                                                                                                                                                                 
               DO INIT1                                                                                                                                                                                                                                   
               DO DISCAS1                                                                                                                                                                                                                                 
               @15,01 CLEA TO 15,78                                                                                                                                                                                                                       
               LOOP                                                                                                                                                                                                                                       
         ENDC                                                                                                                                                                                                                                             
   ENDC                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
   DO CASE                                                                                                                                                                                                                                                
      CASE LASTKEY() = 27                                                                                                                                                                                                                                 
         IF FLD = 1                                                                                                                                                                                                                                       
            EXIT                                                                                                                                                                                                                                          
         ELSE                                                                                                                                                                                                                                             
            FLD = 1                                                                                                                                                                                                                                       
         ENDI                                                                                                                                                                                                                                             
      CASE (FLD = 1 .AND. MONTH(DTGL1) = CMON) .OR.;                                                                                                                                                                                                      
      (FLD = 2 .AND. MONTH(DTGL2) = CMON)                                                                                                                                                                                                                 
         FLD = FLD + 1                                                                                                                                                                                                                                    
   ENDC                                                                                                                                                                                                                                                   
ENDD                                                                                                                                                                                                                                                      
CLOS ALL                                                                                                                                                                                                                                                  
CLEA                                                                                                                                                                                                                                                      
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC INIT1                                                                                                                                                                                                                                                
*--------                                                                                                                                                                                                                                                 
STOR 1        TO FLD                                                                                                                                                                                                                                      
STOR 0        TO BRS, HAL, CNT, NPIL, NINV, NFEE, NTINV, NTFEE, NGTINV, NGTFEE                                                                                                                                                                            
STOR SPAC(30) TO CNAME                                                                                                                                                                                                                                    
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC DISCAS1                                                                                                                                                                                                                                              
*------------                                                                                                                                                                                                                                             
KET = '== TOTAL REVENUE PER CASHIER =='                                                                                                                                                                                                                   
KOL = (80 - LEN(KET)) / 2                                                                                                                                                                                                                                 
@10,KOL SAY KET                                                                                                                                                                                                                                           
@12,24 SAY 'FROM DATE :   /  /     TO   /  /  '                                                                                                                                                                                                           
@22,01 SAY 'ESC=CANCEL'                                                                                                                                                                                                                                   
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC PRIN1                                                                                                                                                                                                                                                
*-----------                                                                                                                                                                                                                                              
@22,01 CLEA TO 22,78                                                                                                                                                                                                                                      
@20,32 SAY 'PRINTING ...'                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
GO TOP                                                                                                                                                                                                                                                    
SET PRIN ON                                                                                                                                                                                                                                               
SET DEVI TO PRIN                                                                                                                                                                                                                                          
**SET PRIN TO RCASH.TXT                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
DO HEAD1                                                                                                                                                                                                                                                  
DO WHIL .NOT. EOF()                                                                                                                                                                                                                                       
   CNAME = CASH_NAME                                                                                                                                                                                                                                      
   @BRS,11 SAY 'CASHIER NAME :'                                                                                                                                                                                                                           
   @BRS,26 SAY CNAME                                                                                                                                                                                                                                      
   BRS = BRS + 1                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
   STOR 0 TO NTINV, NTFEE                                                                                                                                                                                                                                 
   DO WHIL (CASH_NAME = CNAME) .AND. .NOT. EOF()                                                                                                                                                                                                          
      IF (DATE_VISIT >= DTGL1) .AND. (DATE_VISIT <= DTGL2)                                                                                                                                                                                                
         DTGL = DATE_VISIT                                                                                                                                                                                                                                
         @BRS,11 SAY DTGL                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
         STOR 0 TO NINV, NFEE                                                                                                                                                                                                                             
         DO WHIL (DATE_VISIT = DTGL) .AND. (CASH_NAME = CNAME) .AND. .NOT. EOF()                                                                                                                                                                          
            SET DEVI TO SCREE                                                                                                                                                                                                                             
            CNT = CNT + 1                                                                                                                                                                                                                                 
            @20,44 SAY CNT PICT '9999'                                                                                                                                                                                                                    
            SET DEVI TO PRIN                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                          
            @BRS,34 SAY INV_NBER                                                                                                                                                                                                                          
            @BRS,46 SAY TOTAL_FEE PICT '##,###,##9'                                                                                                                                                                                                       
                                                                                                                                                                                                                                                          
            BRS  = BRS  + 1                                                                                                                                                                                                                               
            NINV = NINV + 1                                                                                                                                                                                                                               
            NFEE = NFEE + TOTAL_FEE                                                                                                                                                                                                                       
            IF BRS > 57                                                                                                                                                                                                                                   
               DO HEAD1                                                                                                                                                                                                                                   
            ENDI                                                                                                                                                                                                                                          
            SKIP                                                                                                                                                                                                                                          
         ENDD                                                                                                                                                                                                                                             
         NTINV = NTINV + NINV                                                                                                                                                                                                                             
         NTFEE = NTFEE + NFEE                                                                                                                                                                                                                             
      ELSE                                                                                                                                                                                                                                                
         SKIP                                                                                                                                                                                                                                             
      ENDI                                                                                                                                                                                                                                                
   ENDD                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                          
   NGTINV = NGTINV + NTINV                                                                                                                                                                                                                                
   NGTFEE = NGTFEE + NTFEE                                                                                                                                                                                                                                
   @BRS,30   SAY REPLI('-',26)                                                                                                                                                                                                                            
   @BRS+1,13 SAY 'TOTAL BY'                                                                                                                                                                                                                               
   @BRS+1,22 SAY SUBS(ALLTRIM(CNAME),1,10)                                                                                                                                                                                                                
   @BRS+1,34 SAY NTINV PICT '#,##9'                                                                                                                                                                                                                       
   @BRS+1,46 SAY NTFEE PICT '##,###,##9'                                                                                                                                                                                                                  
   @BRS+2,30 SAY REPLI('=',26)                                                                                                                                                                                                                            
   BRS = BRS + 3                                                                                                                                                                                                                                          
ENDD                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
@BRS,10   SAY REPLI('-',46)                                                                                                                                                                                                                               
@BRS+1,19 SAY 'TOTAL ALL ='                                                                                                                                                                                                                               
@BRS+1,33 SAY NGTINV PICT '##,##9'                                                                                                                                                                                                                        
@BRS+1,45 SAY NGTFEE PICT '###,###,##9'                                                                                                                                                                                                                   
@BRS+2,10 SAY REPLI('=',46)                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
SET PRIN OFF                                                                                                                                                                                                                                              
SET DEVI TO SCREE                                                                                                                                                                                                                                         
**SET PRIN TO                                                                                                                                                                                                                                             
@20,01 CLEA TO 20,78                                                                                                                                                                                                                                      
RETU                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
PROC HEAD1                                                                                                                                                                                                                                                
*--------                                                                                                                                                                                                                                                 
*         1         2         3         4         5                                                                                                                                                                                                       
*12345678901234567890123456789012345678901234567890                                                                                                                                                                                                       
*AEA INTERNATIONAL              DATE: 99/99/9999                                                                                                                                                                                                          
*                               PAGE: 9999                                                                                                                                                                                                                
*         TOTAL REVENUE PER CASHIER                                                                                                                                                                                                                       
*=============================================                                                                                                                                                                                                            
*DATE               INVOICE #           AMOUNT                                                                                                                                                                                                            
*=============================================                                                                                                                                                                                                            
*CASHIER NAME : X----------------------------X                                                                                                                                                                                                            
*99/99/9999               9,999       99,999,999                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
HAL = HAL + 1                                                                                                                                                                                                                                             
@01,11 SAY 'AEA INTERNATIONAL'                                                                                                                                                                                                                            
@01,42 SAY 'DATE:'                                                                                                                                                                                                                                        
@01,48 SAY DATE()                                                                                                                                                                                                                                         
@02,42 SAY 'PAGE:'                                                                                                                                                                                                                                        
@02,48 SAY HAL PICT '###9'                                                                                                                                                                                                                                
@03,20 SAY 'TOTAL REVENUE PER CASHIER'                                                                                                                                                                                                                    
@04,11 SAY REPLI('=',45)                                                                                                                                                                                                                                  
@05,11 SAY 'DATE                INVOICE #          AMOUNT'                                                                                                                                                                                                
@06,11 SAY REPLI('=',45)                                                                                                                                                                                                                                  
BRS = 7                                                                                                                                                                                                                                                   
RETU                                                                                                                                                                                                                                                      
